//
//  ResponseData.h
//  Cabs
//
//  Created by Joey on 2018/5/15.
//  Copyright © 2018年 Happyev. All rights reserved.
//

#import <Foundation/Foundation.h>
/** 请求返回的数据*/
@interface ResponseData : NSObject

/** 判断是否返回有效数据*/
@property (nonatomic, assign, readonly) BOOL success;
/** 请求失败或者服务返回错误的信息*/
@property (nonatomic, copy, readonly) NSString *errorInfo;
/** 原始数据*/
@property (nonatomic, strong, readonly) id responseRawData;
/** 处理后的数据*/
@property (nonatomic, strong, readonly) id responseData;

+ (instancetype)responseDataWithData:(id)data reponseObjctClass:(Class)reponseObjctClass;

+ (instancetype)responseDataWithError:(NSError *)error;

+(UIViewController *)getCurrentVCFrom:(UIViewController *)rootVC;

@end
